home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!husc6!cmcl2!rutgers!labrea!decwrl!decvax!tektronix!tekgen!tekred!games-request
- From: games-request@tekred.TEK.COM
- Newsgroups: comp.sources.games
- Subject: v02i036: dungeon - game of adventure, Part03/14
- Message-ID: <1559@tekred.TEK.COM>
- Date: 1 Sep 87 19:27:42 GMT
- Sender: billr@tekred.TEK.COM
- Lines: 2617
- Approved: billr@tekred.TEK.COM
-
- Submitted by: Bill Randle <games-request@tekred.TEK.COM>
- Comp.sources.games: Volume 2, Issue 36
- Archive-name: dungeon/Part03
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 3 (of 7)."
- # Contents: objcts.F rooms.F sobjs.F verbs.h villns.F
- # Wrapped by billr@tekred on Tue Apr 21 10:24:26 1987
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f objcts.F -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"objcts.F\"
- else
- echo shar: Extracting \"objcts.F\" \(15854 characters\)
- sed "s/^X//" >objcts.F <<'END_OF_objcts.F'
- XC OAPPLI- OBJECT SPECIAL ACTION ROUTINES
- XC
- XC COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
- XC ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
- XC WRITTEN BY R. M. SUPNIK
- XC
- XC DECLARATIONS
- XC
- X LOGICAL FUNCTION OAPPLI(RI,ARG)
- X IMPLICIT INTEGER (A-Z)
- X LOGICAL SOBJS,NOBJS
- X LOGICAL QOPEN,QON,LIT
- X LOGICAL MOVETO,RMDESC,CLOCKD
- X LOGICAL THIEFP,CYCLOP,TROLLP,BALLOP,LIGHTP
- X LOGICAL QEMPTY,QHERE,F,OPNCLS
- X#include "parser.h"
- X#include "gamestate.h"
- X#include "state.h"
- XC
- X COMMON /BATS/ BATDRP(9)
- XC
- XC PUZZLE ROOM
- XC
- X COMMON /PUZZLE/ CPDR(16),CPWL(8),CPVEC(64)
- X#include "rooms.h"
- X#include "rflag.h"
- X#include "rindex.h"
- X#include "objects.h"
- X#include "oflags.h"
- X#include "oindex.h"
- X#include "clock.h"
- X
- X#include "advers.h"
- X#include "verbs.h"
- X#include "flags.h"
- XC
- XC FUNCTIONS AND DATA
- XC
- X QOPEN(R)=and(OFLAG2(R),OPENBT).NE.0
- X QON(R)=and(OFLAG1(R),ONBT).NE.0
- X DATA MXSMP/99/
- XC OAPPLI, PAGE 2
- XC
- X IF(RI.EQ.0) GO TO 10
- XC !ZERO IS FALSE APP.
- X IF(RI.LE.MXSMP) GO TO 100
- XC !SIMPLE OBJECT?
- X IF(PRSO.GT.220) GO TO 5
- X IF(PRSO.NE.0) ODO2=ODESC2(PRSO)
- X5 IF(PRSI.NE.0) ODI2=ODESC2(PRSI)
- X AV=AVEHIC(WINNER)
- X FLOBTS=FLAMBT+LITEBT+ONBT
- X OAPPLI=.TRUE.
- XC
- X GO TO (2000,5000,10000,11000,12000,15000,18000,
- X& 19000,20000,22000,25000,26000,32000,35000,39000,40000,
- X& 45000,47000,48000,49000,50000,51000,52000,54000,55000,
- X& 56000,57000,58000,59000,60000,61000,62000),
- X& (RI-MXSMP)
- X CALL BUG(6,RI)
- XC
- XC RETURN HERE TO DECLARE FALSE RESULT
- XC
- X10 OAPPLI=.FALSE.
- X RETURN
- XC
- XC SIMPLE OBJECTS, PROCESSED EXTERNALLY.
- XC
- X100 IF(RI.LT.32) OAPPLI=SOBJS(RI,ARG)
- X IF(RI.GE.32) OAPPLI=NOBJS(RI,ARG)
- X RETURN
- XC OAPPLI, PAGE 3
- XC
- XC O100-- MACHINE FUNCTION
- XC
- X2000 IF(HERE.NE.MMACH) GO TO 10
- XC !NOT HERE? F
- X OAPPLI=OPNCLS(MACHI,123,124)
- XC !HANDLE OPN/CLS.
- X RETURN
- XC
- XC O101-- WATER FUNCTION
- XC
- X5000 IF(PRSA.NE.FILLW) GO TO 5050
- XC !FILL X WITH Y IS
- X PRSA=PUTW
- XC !MADE INTO
- X I=PRSI
- X PRSI=PRSO
- X PRSO=I
- XC !PUT Y IN X.
- X I=ODI2
- X ODI2=ODO2
- X ODO2=I
- X5050 IF((PRSO.EQ.WATER).OR.(PRSO.EQ.GWATE)) GO TO 5100
- X CALL RSPEAK(561)
- XC !WATER IS IND OBJ,
- X RETURN
- XC !PUNT.
- XC
- X5100 IF(PRSA.NE.TAKEW) GO TO 5400
- XC !TAKE WATER?
- X IF((OADV(BOTTL).EQ.WINNER).AND.(OCAN(PRSO).NE.BOTTL))
- X& GO TO 5500
- X IF(OCAN(PRSO).EQ.0) GO TO 5200
- XC !INSIDE ANYTHING?
- X IF(QOPEN(OCAN(PRSO))) GO TO 5200
- XC !YES, OPEN?
- X CALL RSPEAK(525,ODESC2(OCAN(PRSO)))
- XC !INSIDE, CLOSED, PUNT.
- X RETURN
- XC
- X5200 CALL RSPEAK(615)
- XC !NOT INSIDE OR OPEN,
- X RETURN
- XC !SLIPS THRU FINGERS.
- XC
- X5400 IF(PRSA.NE.PUTW) GO TO 5700
- XC !PUT WATER IN X?
- X IF((AV.NE.0).AND.(PRSI.EQ.AV)) GO TO 5800
- XC !IN VEH?
- X IF(PRSI.EQ.BOTTL) GO TO 5500
- XC !IN BOTTLE?
- X CALL RSPSUB(297,ODI2)
- XC !WONT GO ELSEWHERE.
- X CALL NEWSTA(PRSO,0,0,0,0)
- XC !VANISH WATER.
- X RETURN
- XC
- X5500 IF(QOPEN(BOTTL)) GO TO 5550
- XC !BOTTLE OPEN?
- X CALL RSPEAK(612)
- XC !NO, LOSE.
- X RETURN
- XC
- X5550 IF(QEMPTY(BOTTL)) GO TO 5600
- XC !OPEN, EMPTY?
- X CALL RSPEAK(613)
- XC !NO, ALREADY FULL.
- X RETURN
- XC
- X5600 CALL NEWSTA(WATER,614,0,BOTTL,0)
- XC !TAKE WATER TO BOTTLE.
- X RETURN
- XC
- X5700 IF((PRSA.NE.DROPW).AND.(PRSA.NE.POURW).AND.
- X& (PRSA.NE.GIVEW)) GO TO 5900
- X IF(AV.NE.0) GO TO 5800
- XC !INTO VEHICLE?
- X CALL NEWSTA(PRSO,133,0,0,0)
- XC !NO, VANISHES.
- X RETURN
- XC
- X5800 CALL NEWSTA(WATER,0,0,AV,0)
- XC !WATER INTO VEHICLE.
- X CALL RSPSUB(296,ODESC2(AV))
- XC !DESCRIBE.
- X RETURN
- XC
- X5900 IF(PRSA.NE.THROWW) GO TO 10
- XC !LAST CHANCE, THROW?
- X CALL NEWSTA(PRSO,132,0,0,0)
- XC !VANISHES.
- X RETURN
- XC OAPPLI, PAGE 4
- XC
- XC O102-- LEAF PILE
- XC
- X10000 IF(PRSA.NE.BURNW) GO TO 10500
- XC !BURN?
- X IF(OROOM(PRSO).EQ.0) GO TO 10100
- XC !WAS HE CARRYING?
- X CALL NEWSTA(PRSO,158,0,0,0)
- XC !NO, BURN IT.
- X RETURN
- XC
- X10100 CALL NEWSTA(PRSO,0,HERE,0,0)
- XC !DROP LEAVES.
- X CALL JIGSUP(159)
- XC !BURN HIM.
- X RETURN
- XC
- X10500 IF(PRSA.NE.MOVEW) GO TO 10600
- XC !MOVE?
- X CALL RSPEAK(2)
- XC !DONE.
- X RETURN
- XC
- X10600 IF((PRSA.NE.LOOKUW).OR.(RVCLR.NE.0)) GO TO 10
- X CALL RSPEAK(344)
- XC !LOOK UNDER?
- X RETURN
- XC
- XC O103-- TROLL, DONE EXTERNALLY.
- XC
- X11000 OAPPLI=TROLLP(ARG)
- XC !TROLL PROCESSOR.
- X RETURN
- XC
- XC O104-- RUSTY KNIFE.
- XC
- X12000 IF(PRSA.NE.TAKEW) GO TO 12100
- XC !TAKE?
- X IF(OADV(SWORD).EQ.WINNER) CALL RSPEAK(160)
- XC !PULSE SWORD.
- X GO TO 10
- XC
- X12100 IF((((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW)).OR.
- X& (PRSI.NE.RKNIF)).AND.
- X& (((PRSA.NE.SWINGW).AND.(PRSA.NE.THROWW)).OR.
- X& (PRSO.NE.RKNIF))) GO TO 10
- X CALL NEWSTA(RKNIF,0,0,0,0)
- XC !KILL KNIFE.
- X CALL JIGSUP(161)
- XC !KILL HIM.
- X RETURN
- XC OAPPLI, PAGE 5
- XC
- XC O105-- GLACIER
- XC
- X15000 IF(PRSA.NE.THROWW) GO TO 15500
- XC !THROW?
- X IF(PRSO.NE.TORCH) GO TO 15400
- XC !TORCH?
- X CALL NEWSTA(ICE,169,0,0,0)
- XC !MELT ICE.
- X ODESC1(TORCH)=174
- XC !MUNG TORCH.
- X ODESC2(TORCH)=173
- X OFLAG1(TORCH)=and(OFLAG1(TORCH), not(FLOBTS))
- X CALL NEWSTA(TORCH,0,STREA,0,0)
- XC !MOVE TORCH.
- X GLACRF=.TRUE.
- XC !GLACIER GONE.
- X IF(.NOT.LIT(HERE)) CALL RSPEAK(170)
- XC !IN DARK?
- X RETURN
- XC
- X15400 CALL RSPEAK(171)
- XC !JOKE IF NOT TORCH.
- X RETURN
- XC
- X15500 IF((PRSA.NE.MELTW).OR.(PRSO.NE.ICE)) GO TO 10
- X IF(and(OFLAG1(PRSI),FLOBTS).EQ.FLOBTS) GO TO 15600
- X CALL RSPSUB(298,ODI2)
- XC !CANT MELT WITH THAT.
- X RETURN
- XC
- X15600 GLACMF=.TRUE.
- XC !PARTIAL MELT.
- X IF(PRSI.NE.TORCH) GO TO 15700
- XC !MELT WITH TORCH?
- X ODESC1(TORCH)=174
- XC !MUNG TORCH.
- X ODESC2(TORCH)=173
- X OFLAG1(TORCH)=and(OFLAG1(TORCH), not(FLOBTS))
- X15700 CALL JIGSUP(172)
- XC !DROWN.
- X RETURN
- XC
- XC O106-- BLACK BOOK
- XC
- X18000 IF(PRSA.NE.OPENW) GO TO 18100
- XC !OPEN?
- X CALL RSPEAK(180)
- XC !JOKE.
- X RETURN
- XC
- X18100 IF(PRSA.NE.CLOSEW) GO TO 18200
- XC !CLOSE?
- X CALL RSPEAK(181)
- X RETURN
- XC
- X18200 IF(PRSA.NE.BURNW) GO TO 10
- XC !BURN?
- X CALL NEWSTA(PRSO,0,0,0,0)
- XC !FATAL JOKE.
- X CALL JIGSUP(182)
- X RETURN
- XC OAPPLI, PAGE 6
- XC
- XC O107-- CANDLES, PROCESSED EXTERNALLY
- XC
- X19000 OAPPLI=LIGHTP(CANDL)
- X RETURN
- XC
- XC O108-- MATCHES, PROCESSED EXTERNALLY
- XC
- X20000 OAPPLI=LIGHTP(MATCH)
- X RETURN
- XC
- XC O109-- CYCLOPS, PROCESSED EXTERNALLY.
- XC
- X22000 OAPPLI=CYCLOP(ARG)
- XC !CYCLOPS
- X RETURN
- XC
- XC O110-- THIEF, PROCESSED EXTERNALLY
- XC
- X25000 OAPPLI=THIEFP(ARG)
- X RETURN
- XC
- XC O111-- WINDOW
- XC
- X26000 OAPPLI=OPNCLS(WINDO,208,209)
- XC !OPEN/CLS WINDOW.
- X RETURN
- XC
- XC O112-- PILE OF BODIES
- XC
- X32000 IF(PRSA.NE.TAKEW) GO TO 32500
- XC !TAKE?
- X CALL RSPEAK(228)
- XC !CANT.
- X RETURN
- XC
- X32500 IF((PRSA.NE.BURNW).AND.(PRSA.NE.MUNGW)) GO TO 10
- X IF(ONPOLF) RETURN
- XC !BURN OR MUNG?
- X ONPOLF=.TRUE.
- XC !SET HEAD ON POLE.
- X CALL NEWSTA(HPOLE,0,LLD2,0,0)
- X CALL JIGSUP(229)
- XC !BEHEADED.
- X RETURN
- XC
- XC O113-- VAMPIRE BAT
- XC
- X35000 CALL RSPEAK(50)
- XC !TIME TO FLY, JACK.
- X F=MOVETO(BATDRP(RND(9)+1),WINNER)
- XC !SELECT RANDOM DEST.
- X F=RMDESC(0)
- X RETURN
- XC OAPPLI, PAGE 7
- XC
- XC O114-- STICK
- XC
- X39000 IF(PRSA.NE.WAVEW) GO TO 10
- XC !WAVE?
- X IF(HERE.EQ.MRAIN) GO TO 39500
- XC !ON RAINBOW?
- X IF((HERE.EQ.POG).OR.(HERE.EQ.FALLS)) GO TO 39200
- X CALL RSPEAK(244)
- XC !NOTHING HAPPENS.
- X RETURN
- XC
- X39200 OFLAG1(POT)=or(OFLAG1(POT),VISIBT)
- X RAINBF=.NOT. RAINBF
- XC !COMPLEMENT RAINBOW.
- X I=245
- XC !ASSUME OFF.
- X IF(RAINBF) I=246
- XC !IF ON, SOLID.
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC
- X39500 RAINBF=.FALSE.
- XC !ON RAINBOW,
- X CALL JIGSUP(247)
- XC !TAKE A FALL.
- X RETURN
- XC
- XC O115-- BALLOON, HANDLED EXTERNALLY
- XC
- X40000 OAPPLI=BALLOP(ARG)
- X RETURN
- XC
- XC O116-- HEADS
- XC
- X45000 IF(PRSA.NE.HELLOW) GO TO 45100
- XC !HELLO HEADS?
- X CALL RSPEAK(633)
- XC !TRULY BIZARRE.
- X RETURN
- XC
- X45100 IF(PRSA.EQ.READW) GO TO 10
- XC !READ IS OK.
- X CALL NEWSTA(LCASE,260,LROOM,0,0)
- XC !MAKE LARGE CASE.
- X I=ROBADV(WINNER,0,LCASE,0)+ROBRM(HERE,100,0,LCASE,0)
- X CALL JIGSUP(261)
- XC !KILL HIM.
- X RETURN
- XC OAPPLI, PAGE 8
- XC
- XC O117-- SPHERE
- XC
- X47000 IF(CAGESF.OR.(PRSA.NE.TAKEW)) GO TO 10
- XC !TAKE?
- X IF(WINNER.NE.PLAYER) GO TO 47500
- XC !ROBOT TAKE?
- X CALL RSPEAK(263)
- XC !NO, DROP CAGE.
- X IF(OROOM(ROBOT).NE.HERE) GO TO 47200
- XC !ROBOT HERE?
- X F=MOVETO(CAGED,WINNER)
- XC !YES, MOVE INTO CAGE.
- X CALL NEWSTA(ROBOT,0,CAGED,0,0)
- XC !MOVE ROBOT.
- X AROOM(AROBOT)=CAGED
- X OFLAG1(ROBOT)=or(OFLAG1(ROBOT),NDSCBT)
- X CTICK(CEVSPH)=10
- XC !GET OUT IN 10 OR ELSE.
- X RETURN
- XC
- X47200 CALL NEWSTA(SPHER,0,0,0,0)
- XC !YOURE DEAD.
- X RFLAG(CAGER)=or(RFLAG(CAGER),RMUNG)
- X RRAND(CAGER)=147
- X CALL JIGSUP(148)
- XC !MUNG PLAYER.
- X RETURN
- XC
- X47500 CALL NEWSTA(SPHER,0,0,0,0)
- XC !ROBOT TRIED,
- X CALL NEWSTA(ROBOT,264,0,0,0)
- XC !KILL HIM.
- X CALL NEWSTA(CAGE,0,HERE,0,0)
- XC !INSERT MANGLED CAGE.
- X RETURN
- XC
- XC O118-- GEOMETRICAL BUTTONS
- XC
- X48000 IF(PRSA.NE.PUSHW) GO TO 10
- XC !PUSH?
- X I=PRSO-SQBUT+1
- XC !GET BUTTON INDEX.
- X IF((I.LE.0).OR.(I.GE.4)) GO TO 10
- XC !A BUTTON?
- X IF(WINNER.NE.PLAYER) GO TO (48100,48200,48300),I
- X CALL JIGSUP(265)
- XC !YOU PUSHED, YOU DIE.
- X RETURN
- XC
- X48100 I=267
- X IF(CAROZF) I=266
- XC !SPEED UP?
- X CAROZF=.TRUE.
- X CALL RSPEAK(I)
- X RETURN
- XC
- X48200 I=266
- XC !ASSUME NO CHANGE.
- X IF(CAROZF) I=268
- X CAROZF=.FALSE.
- X CALL RSPEAK(I)
- X RETURN
- XC
- X48300 CAROFF=.NOT.CAROFF
- XC !FLIP CAROUSEL.
- X IF(.NOT.QHERE(IRBOX,CAROU)) RETURN
- XC !IRON BOX IN CAROUSEL?
- X CALL RSPEAK(269)
- XC !YES, THUMP.
- X OFLAG1(IRBOX)=xor(OFLAG1(IRBOX),VISIBT)
- X IF(CAROFF) RFLAG(CAROU)=and(RFLAG(CAROU), not(RSEEN))
- X RETURN
- XC
- XC O119-- FLASK FUNCTION
- XC
- X49000 IF(PRSA.EQ.OPENW) GO TO 49100
- XC !OPEN?
- X IF((PRSA.NE.MUNGW).AND.(PRSA.NE.THROWW)) GO TO 10
- X CALL NEWSTA(FLASK,270,0,0,0)
- XC !KILL FLASK.
- X49100 RFLAG(HERE)=or(RFLAG(HERE),RMUNG)
- X RRAND(HERE)=271
- X CALL JIGSUP(272)
- XC !POISONED.
- X RETURN
- XC
- XC O120-- BUCKET FUNCTION
- XC
- X50000 IF(ARG.NE.2) GO TO 10
- XC !READOUT?
- X IF((OCAN(WATER).NE.BUCKE).OR.BUCKTF) GO TO 50500
- X BUCKTF=.TRUE.
- XC !BUCKET AT TOP.
- X CTICK(CEVBUC)=100
- XC !START COUNTDOWN.
- X CALL NEWSTA(BUCKE,290,TWELL,0,0)
- XC !REPOSITION BUCKET.
- X GO TO 50900
- XC !FINISH UP.
- XC
- X50500 IF((OCAN(WATER).EQ.BUCKE).OR..NOT.BUCKTF) GO TO 10
- X BUCKTF=.FALSE.
- X CALL NEWSTA(BUCKE,291,BWELL,0,0)
- XC !BUCKET AT BOTTOM.
- X50900 IF(AV.NE.BUCKE) RETURN
- XC !IN BUCKET?
- X F=MOVETO(OROOM(BUCKE),WINNER)
- XC !MOVE ADVENTURER.
- X F=RMDESC(0)
- XC !DESCRIBE ROOM.
- X RETURN
- XC OAPPLI, PAGE 9
- XC
- XC O121-- EATME CAKE
- XC
- X51000 IF((PRSA.NE.EATW).OR.(PRSO.NE.ECAKE).OR.
- X& (HERE.NE.ALICE)) GO TO 10
- X CALL NEWSTA(ECAKE,273,0,0,0)
- XC !VANISH CAKE.
- X OFLAG1(ROBOT)=and(OFLAG1(ROBOT), not(VISIBT))
- X OAPPLI=MOVETO(ALISM,WINNER)
- XC !MOVE TO ALICE SMALL.
- X IZ=64
- X IR=ALISM
- X IO=ALICE
- X GO TO 52405
- XC
- XC O122-- ICINGS
- XC
- X52000 IF(PRSA.NE.READW) GO TO 52200
- XC !READ?
- X I=274
- XC !CANT READ.
- X IF(PRSI.NE.0) I=275
- XC !THROUGH SOMETHING?
- X IF(PRSI.EQ.BOTTL) I=276
- XC !THROUGH BOTTLE?
- X IF(PRSI.EQ.FLASK) I=277+(PRSO-ORICE)
- XC !THROUGH FLASK?
- X CALL RSPEAK(I)
- XC !READ FLASK.
- X RETURN
- XC
- X52200 IF((PRSA.NE.THROWW).OR.(PRSO.NE.RDICE).OR.(PRSI.NE.POOL))
- X& GO TO 52300
- X CALL NEWSTA(POOL,280,0,0,0)
- XC !VANISH POOL.
- X OFLAG1(SAFFR)=or(OFLAG1(SAFFR),VISIBT)
- X RETURN
- XC
- X52300 IF((HERE.NE.ALICE).AND.(HERE.NE.ALISM).AND.(HERE.NE.ALITR))
- X& GO TO 10
- X IF(((PRSA.NE.EATW).AND.(PRSA.NE.THROWW)).OR.
- X& (PRSO.NE.ORICE)) GO TO 52400
- X CALL NEWSTA(ORICE,0,0,0,0)
- XC !VANISH ORANGE ICE.
- X RFLAG(HERE)=or(RFLAG(HERE),RMUNG)
- X RRAND(HERE)=281
- X CALL JIGSUP(282)
- XC !VANISH ADVENTURER.
- X RETURN
- XC
- X52400 IF((PRSA.NE.EATW).OR.(PRSO.NE.BLICE))
- X& GO TO 10
- X CALL NEWSTA(BLICE,283,0,0,0)
- XC !VANISH BLUE ICE.
- X IF(HERE.NE.ALISM) GO TO 52500
- XC !IN REDUCED ROOM?
- X OFLAG1(ROBOT)=or(OFLAG1(ROBOT),VISIBT)
- X IO=HERE
- X OAPPLI=MOVETO(ALICE,WINNER)
- X IZ=1/64
- X IR=ALICE
- XC
- XC Do a size change, common loop used also by code at 51000
- XC
- X52405 DO 52450 I=1,OLNT
- XC !ENLARGE WORLD.
- X IF((OROOM(I).NE.IO).OR.(OSIZE(I).EQ.10000))
- X& GO TO 52450
- X OROOM(I)=IR
- X OSIZE(I)=OSIZE(I)*IZ
- X52450 CONTINUE
- X RETURN
- XC
- X52500 CALL JIGSUP(284)
- XC !ENLARGED IN WRONG ROOM.
- X RETURN
- XC
- XC O123-- BRICK
- XC
- X54000 IF(PRSA.NE.BURNW) GO TO 10
- XC !BURN?
- X CALL JIGSUP(150)
- XC !BOOM
- XC !
- X RETURN
- XC
- XC O124-- MYSELF
- XC
- X55000 IF(PRSA.NE.GIVEW) GO TO 55100
- XC !GIVE?
- X CALL NEWSTA(PRSO,2,0,0,PLAYER)
- XC !DONE.
- X RETURN
- XC
- X55100 IF(PRSA.NE.TAKEW) GO TO 55200
- XC !TAKE?
- X CALL RSPEAK(286)
- XC !JOKE.
- X RETURN
- XC
- X55200 IF((PRSA.NE.KILLW).AND.(PRSA.NE.MUNGW)) GO TO 10
- X CALL JIGSUP(287)
- XC !KILL, NO JOKE.
- X RETURN
- XC OAPPLI, PAGE 10
- XC
- XC O125-- PANELS INSIDE MIRROR
- XC
- X56000 IF(PRSA.NE.PUSHW) GO TO 10
- XC !PUSH?
- X IF(POLEUF.NE.0) GO TO 56100
- XC !SHORT POLE UP?
- X I=731
- XC !NO, WONT BUDGE.
- X IF(MOD(MDIR,180).EQ.0) I=732
- XC !DIFF MSG IF N-S.
- X CALL RSPEAK(I)
- XC !TELL WONT MOVE.
- X RETURN
- XC
- X56100 IF(MLOC.NE.MRG) GO TO 56200
- XC !IN GDN ROOM?
- X CALL RSPEAK(733)
- XC !YOU LOSE.
- X CALL JIGSUP(685)
- X RETURN
- XC
- X56200 I=831
- XC !ROTATE L OR R.
- X IF((PRSO.EQ.RDWAL).OR.(PRSO.EQ.YLWAL)) I=830
- X CALL RSPEAK(I)
- XC !TELL DIRECTION.
- X MDIR=MOD(MDIR+45+(270*(I-830)),360)
- XC !CALCULATE NEW DIR.
- X CALL RSPSUB(734,695+(MDIR/45))
- XC !TELL NEW DIR.
- X IF(WDOPNF) CALL RSPEAK(730)
- XC !IF PANEL OPEN, CLOSE.
- X WDOPNF=.FALSE.
- X RETURN
- XC !DONE.
- XC
- XC O126-- ENDS INSIDE MIRROR
- XC
- X57000 IF(PRSA.NE.PUSHW) GO TO 10
- XC !PUSH?
- X IF(MOD(MDIR,180).EQ.0) GO TO 57100
- XC !MIRROR N-S?
- X CALL RSPEAK(735)
- XC !NO, WONT BUDGE.
- X RETURN
- XC
- X57100 IF(PRSO.NE.PINDR) GO TO 57300
- XC !PUSH PINE WALL?
- X IF(((MLOC.EQ.MRC).AND.(MDIR.EQ.180)).OR.
- X& ((MLOC.EQ.MRD).AND.(MDIR.EQ.0)).OR.
- X& (MLOC.EQ.MRG)) GO TO 57200
- X CALL RSPEAK(736)
- XC !NO, OPENS.
- X WDOPNF=.TRUE.
- XC !INDICATE OPEN.
- X CFLAG(CEVPIN)=.TRUE.
- XC !TIME OPENING.
- X CTICK(CEVPIN)=5
- X RETURN
- XC
- X57200 CALL RSPEAK(737)
- XC !GDN SEES YOU, DIE.
- X CALL JIGSUP(685)
- X RETURN
- XC
- X57300 NLOC=MLOC-1
- XC !NEW LOC IF SOUTH.
- X IF(MDIR.EQ.0) NLOC=MLOC+1
- XC !NEW LOC IF NORTH.
- X IF((NLOC.GE.MRA).AND.(NLOC.LE.MRD)) GO TO 57400
- X CALL RSPEAK(738)
- XC !HAVE REACHED END.
- X RETURN
- XC
- X57400 I=699
- XC !ASSUME SOUTH.
- X IF(MDIR.EQ.0) I=695
- XC !NORTH.
- X J=739
- XC !ASSUME SMOOTH.
- X IF(POLEUF.NE.0) J=740
- XC !POLE UP, WOBBLES.
- X CALL RSPSUB(J,I)
- XC !DESCRIBE.
- X MLOC=NLOC
- X IF(MLOC.NE.MRG) RETURN
- XC !NOW IN GDN ROOM?
- XC
- X IF(POLEUF.NE.0) GO TO 57500
- XC !POLE UP, GDN SEES.
- X IF(MROPNF.OR.WDOPNF) GO TO 57600
- XC !DOOR OPEN, GDN SEES.
- X IF(MR1F.AND.MR2F) RETURN
- XC !MIRRORS INTACT, OK.
- X CALL RSPEAK(742)
- XC !MIRRORS BROKEN, DIE.
- X CALL JIGSUP(743)
- X RETURN
- XC
- X57500 CALL RSPEAK(741)
- XC !POLE UP, DIE.
- X CALL JIGSUP(743)
- X RETURN
- XC
- X57600 CALL RSPEAK(744)
- XC !DOOR OPEN, DIE.
- X CALL JIGSUP(743)
- X RETURN
- XC OAPPLI, PAGE 11
- XC
- XC O127-- GLOBAL GUARDIANS
- XC
- X58000 IF((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW).AND.
- X& (PRSA.NE.MUNGW)) GO TO 58100
- X CALL JIGSUP(745)
- XC !LOSE.
- X RETURN
- XC
- X58100 IF(PRSA.NE.HELLOW) GO TO 10
- XC !HELLO?
- X CALL RSPEAK(746)
- XC !NO REPLY.
- X RETURN
- XC
- XC O128-- GLOBAL MASTER
- XC
- X59000 IF((PRSA.NE.ATTACW).AND.(PRSA.NE.KILLW).AND.
- X& (PRSA.NE.MUNGW)) GO TO 59100
- X CALL JIGSUP(747)
- XC !BAD IDEA.
- X RETURN
- XC
- X59100 IF(PRSA.NE.TAKEW) GO TO 10
- XC !TAKE?
- X CALL RSPEAK(748)
- XC !JOKE.
- X RETURN
- XC
- XC O129-- NUMERAL FIVE (FOR JOKE)
- XC
- X60000 IF(PRSA.NE.TAKEW) GO TO 10
- XC !TAKE FIVE?
- X CALL RSPEAK(419)
- XC !TIME PASSES.
- X DO 60100 I=1,3
- XC !WAIT A WHILE.
- X IF(CLOCKD(X)) RETURN
- X60100 CONTINUE
- X RETURN
- XC
- XC O130-- CRYPT FUNCTION
- XC
- X61000 IF(.NOT.ENDGMF) GO TO 45000
- XC !IF NOT EG, DIE.
- X IF(PRSA.NE.OPENW) GO TO 61100
- XC !OPEN?
- X I=793
- X IF(QOPEN(TOMB)) I=794
- X CALL RSPEAK(I)
- X OFLAG2(TOMB)=or(OFLAG2(TOMB),OPENBT)
- X RETURN
- XC
- X61100 IF(PRSA.NE.CLOSEW) GO TO 45000
- XC !CLOSE?
- X I=795
- X IF(QOPEN(TOMB)) I=796
- X CALL RSPEAK(I)
- X OFLAG2(TOMB)=and(OFLAG2(TOMB),not(OPENBT))
- X IF(HERE.EQ.CRYPT) CTICK(CEVSTE)=3
- XC !IF IN CRYPT, START EG.
- X RETURN
- XC OAPPLI, PAGE 12
- XC
- XC O131-- GLOBAL LADDER
- XC
- X62000 IF((CPVEC(CPHERE+1).EQ.-2).OR.(CPVEC(CPHERE-1).EQ.-3))
- X& GO TO 62100
- X CALL RSPEAK(865)
- XC !NO, LOSE.
- X RETURN
- XC
- X62100 IF((PRSA.EQ.CLMBW).OR.(PRSA.EQ.CLMBUW)) GO TO 62200
- X CALL RSPEAK(866)
- XC !CLIMB IT?
- X RETURN
- XC
- X62200 IF((CPHERE.EQ.10).AND.(CPVEC(CPHERE+1).EQ.-2))
- X& GO TO 62300
- X CALL RSPEAK(867)
- XC !NO, HIT YOUR HEAD.
- X RETURN
- XC
- X62300 F=MOVETO(CPANT,WINNER)
- XC !TO ANTEROOM.
- X F=RMDESC(3)
- XC !DESCRIBE.
- X RETURN
- XC
- X END
- END_OF_objcts.F
- if test 15854 -ne `wc -c <objcts.F`; then
- echo shar: \"objcts.F\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f rooms.F -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"rooms.F\"
- else
- echo shar: Extracting \"rooms.F\" \(13238 characters\)
- sed "s/^X//" >rooms.F <<'END_OF_rooms.F'
- XC RAPPL1- SPECIAL PURPOSE ROOM ROUTINES, PART 1
- XC
- XC COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
- XC ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
- XC WRITTEN BY R. M. SUPNIK
- XC
- XC DECLARATIONS
- XC
- X LOGICAL FUNCTION RAPPL1(RI)
- X IMPLICIT INTEGER (A-Z)
- X LOGICAL QOPEN,QON,QHERE,PROB,F
- X LOGICAL MOVETO,LIT
- X#include "parser.h"
- X#include "gamestate.h"
- X#include "state.h"
- XC
- XC SCREEN OF LIGHT
- XC
- X COMMON /SCREEN/ FROMDR,SCOLRM,SCOLAC
- X COMMON /SCREEN/ SCOLDR(8),SCOLWL(12)
- XC
- XC MISCELLANEOUS VARIABLES
- XC
- X COMMON /BATS/ BATDRP(9)
- X#include "rooms.h"
- X#include "rflag.h"
- X#include "rindex.h"
- X#include "objects.h"
- X#include "oflags.h"
- X#include "oindex.h"
- X#include "clock.h"
- X#include "villians.h"
- X#include "advers.h"
- X#include "verbs.h"
- X#include "flags.h"
- XC
- XC FUNCTIONS AND DATA
- XC
- X QOPEN(R)=and(OFLAG2(R),OPENBT).NE.0
- X QON(R)=and(OFLAG1(R),ONBT).NE.0
- XC RAPPL1, PAGE 2
- XC
- X RAPPL1=.TRUE.
- XC !USUALLY IGNORED.
- X IF(RI.EQ.0) RETURN
- XC !RETURN IF NAUGHT.
- XC
- XC !SET TO FALSE FOR
- XC
- XC !NEW DESC NEEDED.
- X GO TO (1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,
- X& 11000,12000,13000,14000,15000,16000,17000,18000,19000,20000,
- X& 21000,22000,23000,24000,25000,26000,27000,28000,29000,30000,
- X& 31000,32000,33000,34000,35000,36000,37000),RI
- X CALL BUG(1,RI)
- XC
- XC R1-- EAST OF HOUSE. DESCRIPTION DEPENDS ON STATE OF WINDOW
- XC
- X1000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X I=13
- XC !ASSUME CLOSED.
- X IF(QOPEN(WINDO)) I=12
- XC !IF OPEN, AJAR.
- X CALL RSPSUB(11,I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R2-- KITCHEN. SAME VIEW FROM INSIDE.
- XC
- X2000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X I=13
- XC !ASSUME CLOSED.
- X IF(QOPEN(WINDO)) I=12
- XC !IF OPEN, AJAR.
- X CALL RSPSUB(14,I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R3-- LIVING ROOM. DESCRIPTION DEPENDS ON MAGICF (STATE OF
- XC DOOR TO CYCLOPS ROOM), RUG (MOVED OR NOT), DOOR (OPEN OR CLOSED)
- XC
- X3000 IF(PRSA.NE.LOOKW) GO TO 3500
- XC !LOOK?
- X I=15
- XC !ASSUME NO HOLE.
- X IF(MAGICF) I=16
- XC !IF MAGICF, CYCLOPS HOLE.
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X I=17+ORRUG
- XC !ASSUME INITIAL STATE.
- X IF(QOPEN(DOOR)) I=I+2
- XC !DOOR OPEN?
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC NOT A LOOK WORD. REEVALUATE TROPHY CASE.
- XC
- X3500 IF((PRSA.NE.TAKEW).AND.((PRSA.NE.PUTW).OR.(PRSI.NE.TCASE)))
- X& RETURN
- X ASCORE(WINNER)=RWSCOR
- XC !SCORE TROPHY CASE.
- X DO 3600 I=1,OLNT
- XC !RETAIN RAW SCORE AS WELL.
- X J=I
- XC !FIND OUT IF IN CASE.
- X3550 J=OCAN(J)
- XC !TRACE OWNERSHIP.
- X IF(J.EQ.0) GO TO 3600
- X IF(J.NE.TCASE) GO TO 3550
- XC !DO ALL LEVELS.
- X ASCORE(WINNER)=ASCORE(WINNER)+OTVAL(I)
- X3600 CONTINUE
- X CALL SCRUPD(0)
- XC !SEE IF ENDGAME TRIG.
- X RETURN
- XC RAPPL1, PAGE 3
- XC
- XC R4-- CELLAR. SHUT DOOR AND BAR IT IF HE JUST WALKED IN.
- XC
- X4000 IF(PRSA.NE.LOOKW) GO TO 4500
- XC !LOOK?
- X CALL RSPEAK(21)
- XC !DESCRIBE CELLAR.
- X RETURN
- XC
- X4500 IF(PRSA.NE.WALKIW) RETURN
- XC !WALKIN?
- X IF(and(OFLAG2(DOOR),(OPENBT+TCHBT)).NE.OPENBT) RETURN
- X OFLAG2(DOOR)=and(and(OFLAG2(DOOR),CHBT), not(OPENBT))
- X CALL RSPEAK(22)
- XC !SLAM AND BOLT DOOR.
- X RETURN
- XC
- XC R5-- MAZE11. DESCRIBE STATE OF GRATING.
- XC
- X5000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(23)
- XC !DESCRIBE.
- X I=24
- XC !ASSUME LOCKED.
- X IF(GRUNLF) I=26
- XC !UNLOCKED?
- X IF(QOPEN(GRATE)) I=25
- XC !OPEN?
- X CALL RSPEAK(I)
- XC !DESCRIBE GRATE.
- X RETURN
- XC
- XC R6-- CLEARING. DESCRIBE CLEARING, MOVE LEAVES.
- XC
- X6000 IF(PRSA.NE.LOOKW) GO TO 6500
- XC !LOOK?
- X CALL RSPEAK(27)
- XC !DESCRIBE.
- X IF(RVCLR.EQ.0) RETURN
- XC !LEAVES MOVED?
- X I=28
- XC !YES, ASSUME GRATE CLOSED.
- X IF(QOPEN(GRATE)) I=29
- XC !OPEN?
- X CALL RSPEAK(I)
- XC !DESCRIBE GRATE.
- X RETURN
- XC
- X6500 IF((RVCLR.NE.0).OR.(QHERE(LEAVE,CLEAR).AND.
- X& ((PRSA.NE.MOVEW).OR.(PRSO.NE.LEAVE)))) RETURN
- X CALL RSPEAK(30)
- XC !MOVE LEAVES, REVEAL GRATE.
- X RVCLR=1
- XC !INDICATE LEAVES MOVED.
- X RETURN
- XC RAPPL1, PAGE 4
- XC
- XC R7-- RESERVOIR SOUTH. DESCRIPTION DEPENDS ON LOW TIDE FLAG.
- XC
- X7000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X I=31
- XC !ASSUME FULL.
- X IF(LWTIDF) I=32
- XC !IF LOW TIDE, EMPTY.
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X CALL RSPEAK(33)
- XC !DESCRIBE EXITS.
- X RETURN
- XC
- XC R8-- RESERVOIR. STATE DEPENDS ON LOW TIDE FLAG.
- XC
- X8000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X I=34
- XC !ASSUME FULL.
- X IF(LWTIDF) I=35
- XC !IF LOW TIDE, EMTPY.
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R9-- RESERVOIR NORTH. ALSO DEPENDS ON LOW TIDE FLAG.
- XC
- X9000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X I=36
- XC !YOU GET THE IDEA.
- X IF(LWTIDF) I=37
- X CALL RSPEAK(I)
- X CALL RSPEAK(38)
- X RETURN
- XC
- XC R10-- GLACIER ROOM. STATE DEPENDS ON MELTED, VANISHED FLAGS.
- XC
- X10000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(39)
- XC !BASIC DESCRIPTION.
- X I=0
- XC !ASSUME NO CHANGES.
- X IF(GLACMF) I=40
- XC !PARTIAL MELT?
- X IF(GLACRF) I=41
- XC !COMPLETE MELT?
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R11-- FOREST ROOM
- XC
- X11000 IF(PRSA.EQ.WALKIW) CFLAG(CEVFOR)=.TRUE.
- XC !IF WALK IN, BIRDIE.
- X RETURN
- XC
- XC R12-- MIRROR ROOM. STATE DEPENDS ON MIRROR INTACT.
- XC
- X12000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(42)
- XC !DESCRIBE.
- X IF(MIRRMF) CALL RSPEAK(43)
- XC !IF BROKEN, NASTY REMARK.
- X RETURN
- XC RAPPL1, PAGE 5
- XC
- XC R13-- CAVE2 ROOM. BLOW OUT CANDLES WITH 50% PROBABILITY.
- XC
- X13000 IF(PRSA.NE.WALKIW) RETURN
- XC !WALKIN?
- X IF(PROB(50,50).OR.(OADV(CANDL).NE.WINNER).OR.
- X& .NOT.QON(CANDL)) RETURN
- X OFLAG1(CANDL)=and(OFLAG1(CANDL), not(ONBT))
- X CALL RSPEAK(47)
- XC !TELL OF WINDS.
- X CFLAG(CEVCND)=.FALSE.
- XC !HALT CANDLE COUNTDOWN.
- X RETURN
- XC
- XC R14-- BOOM ROOM. BLOW HIM UP IF CARRYING FLAMING OBJECT.
- XC
- X14000 J=ODESC2(CANDL)
- XC !ASSUME CANDLE.
- X IF((OADV(CANDL).EQ.WINNER).AND.QON(CANDL)) GO TO 14100
- X J=ODESC2(TORCH)
- XC !ASSUME TORCH.
- X IF((OADV(TORCH).EQ.WINNER).AND.QON(TORCH)) GO TO 14100
- X J=ODESC2(MATCH)
- X IF((OADV(MATCH).EQ.WINNER).AND.QON(MATCH)) GO TO 14100
- X RETURN
- XC !SAFE
- XC
- X14100 IF(PRSA.NE.TRNONW) GO TO 14200
- XC !TURN ON?
- X CALL RSPSUB(294,J)
- XC !BOOM
- XC !
- X CALL JIGSUP(44)
- X RETURN
- XC
- X14200 IF(PRSA.NE.WALKIW) RETURN
- XC !WALKIN?
- X CALL RSPSUB(295,J)
- XC !BOOM
- XC !
- X CALL JIGSUP(44)
- X RETURN
- XC
- XC R15-- NO-OBJS. SEE IF EMPTY HANDED, SCORE LIGHT SHAFT.
- XC
- X15000 EMPTHF=.TRUE.
- XC !ASSUME TRUE.
- X DO 15100 I=1,OLNT
- XC !SEE IF CARRYING.
- X IF(OADV(I).EQ.WINNER) EMPTHF=.FALSE.
- X15100 CONTINUE
- XC
- X IF((HERE.NE.BSHAF).OR.(.NOT.LIT(HERE))) RETURN
- X CALL SCRUPD(LTSHFT)
- XC !SCORE LIGHT SHAFT.
- X LTSHFT=0
- XC !NEVER AGAIN.
- X RETURN
- XC RAPPL1, PAGE 6
- XC
- XC R16-- MACHINE ROOM. DESCRIBE MACHINE.
- XC
- X16000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X I=46
- XC !ASSUME LID CLOSED.
- X IF(QOPEN(MACHI)) I=12
- XC !IF OPEN, OPEN.
- X CALL RSPSUB(45,I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R17-- BAT ROOM. UNLESS CARRYING GARLIC, FLY AWAY WITH ME...
- XC
- X17000 IF(PRSA.NE.LOOKW) GO TO 17500
- XC !LOOK?
- X CALL RSPEAK(48)
- XC !DESCRIBE ROOM.
- X IF(OADV(GARLI).EQ.WINNER) CALL RSPEAK(49)
- XC !BAT HOLDS NOSE.
- X RETURN
- XC
- X17500 IF((PRSA.NE.WALKIW).OR.(OADV(GARLI).EQ.WINNER)) RETURN
- X CALL RSPEAK(50)
- XC !TIME TO FLY, JACK.
- X F=MOVETO(BATDRP(RND(9)+1),WINNER)
- XC !SELECT RANDOM DEST.
- X RAPPL1=.FALSE.
- XC !INDICATE NEW DESC NEEDED.
- X RETURN
- XC
- XC R18-- DOME ROOM. STATE DEPENDS ON WHETHER ROPE TIED TO RAILING.
- XC
- X18000 IF(PRSA.NE.LOOKW) GO TO 18500
- XC !LOOK?
- X CALL RSPEAK(51)
- XC !DESCRIBE.
- X IF(DOMEF) CALL RSPEAK(52)
- XC !IF ROPE, DESCRIBE.
- X RETURN
- XC
- X18500 IF(PRSA.EQ.LEAPW) CALL JIGSUP(53)
- XC !DID HE JUMP???
- X RETURN
- XC
- XC R19-- TORCH ROOM. ALSO DEPENDS ON WHETHER ROPE TIED TO RAILING.
- XC
- X19000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(54)
- XC !DESCRIBE.
- X IF(DOMEF) CALL RSPEAK(55)
- XC !IF ROPE, DESCRIBE.
- X RETURN
- XC
- XC R20-- CAROUSEL ROOM. SPIN HIM OR KILL HIM.
- XC
- X20000 IF(PRSA.NE.LOOKW) GO TO 20500
- XC !LOOK?
- X CALL RSPEAK(56)
- XC !DESCRIBE.
- X IF(.NOT.CAROFF) CALL RSPEAK(57)
- XC !IF NOT FLIPPED, SPIN.
- X RETURN
- XC
- X20500 IF((PRSA.EQ.WALKIW).AND.CAROZF) CALL JIGSUP(58)
- XC !WALKED IN.
- X RETURN
- XC RAPPL1, PAGE 7
- XC
- XC R21-- LLD ROOM. HANDLE EXORCISE, DESCRIPTIONS.
- XC
- X21000 IF(PRSA.NE.LOOKW) GO TO 21500
- XC !LOOK?
- X CALL RSPEAK(59)
- XC !DESCRIBE.
- X IF(.NOT.LLDF) CALL RSPEAK(60)
- XC !IF NOT VANISHED, GHOSTS.
- X RETURN
- XC
- X21500 IF(PRSA.NE.EXORCW) RETURN
- XC !EXORCISE?
- X IF((OADV(BELL).EQ.WINNER).AND.(OADV(BOOK).EQ.WINNER).AND.
- X& (OADV(CANDL).EQ.WINNER).AND.QON(CANDL)) GO TO 21600
- X CALL RSPEAK(62)
- XC !NOT EQUIPPED.
- X RETURN
- XC
- X21600 IF(QHERE(GHOST,HERE)) GO TO 21700
- XC !GHOST HERE?
- X CALL JIGSUP(61)
- XC !NOPE, EXORCISE YOU.
- X RETURN
- XC
- X21700 CALL NEWSTA(GHOST,63,0,0,0)
- XC !VANISH GHOST.
- X LLDF=.TRUE.
- XC !OPEN GATE.
- X RETURN
- XC
- XC R22-- LLD2-ROOM. IS HIS HEAD ON A POLE?
- XC
- X22000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(64)
- XC !DESCRIBE.
- X IF(ONPOLF) CALL RSPEAK(65)
- XC !ON POLE?
- X RETURN
- XC
- XC R23-- DAM ROOM. DESCRIBE RESERVOIR, PANEL.
- XC
- X23000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(66)
- XC !DESCRIBE.
- X I=67
- X IF(LWTIDF) I=68
- X CALL RSPEAK(I)
- XC !DESCRIBE RESERVOIR.
- X CALL RSPEAK(69)
- XC !DESCRIBE PANEL.
- X IF(GATEF) CALL RSPEAK(70)
- XC !BUBBLE IS GLOWING.
- X RETURN
- XC
- XC R24-- TREE ROOM
- XC
- X24000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(660)
- XC !DESCRIBE.
- X I=661
- XC !SET FLAG FOR BELOW.
- X DO 24200 J=1,OLNT
- XC !DESCRIBE OBJ IN FORE3.
- X IF(.NOT.QHERE(J,FORE3).OR.(J.EQ.FTREE)) GO TO 24200
- X CALL RSPEAK(I)
- XC !SET STAGE,
- X I=0
- X CALL RSPSUB(502,ODESC2(J))
- XC !DESCRIBE.
- X24200 CONTINUE
- X RETURN
- XC RAPPL1, PAGE 8
- XC
- XC R25-- CYCLOPS-ROOM. DEPENDS ON CYCLOPS STATE, ASLEEP FLAG, MAGIC FLAG.
- XC
- X25000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(606)
- XC !DESCRIBE.
- X I=607
- XC !ASSUME BASIC STATE.
- X IF(RVCYC.GT.0) I=608
- XC !>0? HUNGRY.
- X IF(RVCYC.LT.0) I=609
- XC !<0? THIRSTY.
- X IF(CYCLOF) I=610
- XC !ASLEEP?
- X IF(MAGICF) I=611
- XC !GONE?
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X IF(.NOT.CYCLOF .AND.(RVCYC.NE.0))
- X& CALL RSPEAK(193+IABS(RVCYC))
- X RETURN
- XC
- XC R26-- BANK BOX ROOM.
- XC
- X26000 IF(PRSA.NE.WALKIW) RETURN
- XC !SURPRISE HIM.
- X DO 26100 I=1,8,2
- XC !SCOLRM DEPENDS ON
- X IF(FROMDR.EQ.SCOLDR(I)) SCOLRM=SCOLDR(I+1)
- X26100 CONTINUE
- XC !ENTRY DIRECTION.
- X RETURN
- XC
- XC R27-- TREASURE ROOM.
- XC
- X27000 IF((PRSA.NE.WALKIW).OR. .NOT.THFACT)
- X& RETURN
- X IF(OROOM(THIEF).NE.HERE)
- X& CALL NEWSTA(THIEF,82,HERE,0,0)
- X THFPOS=HERE
- XC !RESET SEARCH PATTERN.
- X OFLAG2(THIEF)=or(OFLAG2(THIEF),FITEBT)
- X IF(OROOM(CHALI).EQ.HERE)
- X& OFLAG1(CHALI)=and(OFLAG1(CHALI),not(TAKEBT))
- XC
- XC VANISH EVERYTHING IN ROOM
- XC
- X J=0
- XC !ASSUME NOTHING TO VANISH.
- X DO 27200 I=1,OLNT
- X IF((I.EQ.CHALI).OR.(I.EQ.THIEF).OR..NOT.QHERE(I,HERE))
- X& GO TO 27200
- X J=83
- XC !FLAG BYEBYE.
- X OFLAG1(I)=and(OFLAG1(I),not(VISIBT))
- X27200 CONTINUE
- X CALL RSPEAK(J)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R28-- CLIFF FUNCTION. SEE IF CARRYING INFLATED BOAT.
- XC
- X28000 DEFLAF=OADV(RBOAT).NE.WINNER
- XC !TRUE IF NOT CARRYING.
- X RETURN
- XC RAPPL1, PAGE 9
- XC
- XC R29-- RIVR4 ROOM. PLAY WITH BUOY.
- XC
- X29000 IF(.NOT.BUOYF.OR.(OADV(BUOY).NE.WINNER)) RETURN
- X CALL RSPEAK(84)
- XC !GIVE HINT,
- X BUOYF=.FALSE.
- XC !THEN DISABLE.
- X RETURN
- XC
- XC R30-- OVERFALLS. DOOM.
- XC
- X30000 IF(PRSA.NE.LOOKW) CALL JIGSUP(85)
- XC !OVER YOU GO.
- X RETURN
- XC
- XC R31-- BEACH ROOM. DIG A HOLE.
- XC
- X31000 IF((PRSA.NE.DIGW).OR.(PRSO.NE.SHOVE)) RETURN
- X RVSND=RVSND+1
- XC !INCREMENT DIG STATE.
- X GO TO (31100,31100,31100,31400,31500),RVSND
- XC !PROCESS STATE.
- X CALL BUG(2,RVSND)
- XC
- X31100 CALL RSPEAK(85+RVSND)
- XC !1-3... DISCOURAGE HIM.
- X RETURN
- XC
- X31400 I=89
- XC !ASSUME DISCOVERY.
- X IF(and(OFLAG1(STATU),VISIBT).NE.0) I=88
- X CALL RSPEAK(I)
- X OFLAG1(STATU)=or(OFLAG1(STATU),VISIBT)
- X RETURN
- XC
- X31500 RVSND=0
- XC !5... SAND COLLAPSES
- X CALL JIGSUP(90)
- XC !AND SO DOES HE.
- X RETURN
- XC
- XC R32-- TCAVE ROOM. DIG A HOLE IN GUANO.
- XC
- X32000 IF((PRSA.NE.DIGW).OR.(PRSO.NE.SHOVE)) RETURN
- X I=91
- XC !ASSUME NO GUANO.
- X IF(.NOT. QHERE(GUANO,HERE)) GO TO 32100
- XC !IS IT HERE?
- X RVGUA=MIN0(4,RVGUA+1)
- XC !YES, SET NEW STATE.
- X I=91+RVGUA
- XC !GET NASTY REMARK.
- X32100 CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R33-- FALLS ROOM
- XC
- X33000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(96)
- XC !DESCRIBE.
- X I=97
- XC !ASSUME NO RAINBOW.
- X IF(RAINBF) I=98
- XC !GOT ONE?
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC RAPPL1, PAGE 10
- XC
- XC R34-- LEDGE FUNCTION. LEDGE CAN COLLAPSE.
- XC
- X34000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(100)
- XC !DESCRIBE.
- X I=102
- XC !ASSUME SAFE ROOM OK.
- X IF(and(RFLAG(MSAFE),RMUNG).NE.0) I=101
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R35-- SAFE ROOM. STATE DEPENDS ON WHETHER SAFE BLOWN.
- XC
- X35000 IF(PRSA.NE.LOOKW) RETURN
- XC !LOOK?
- X CALL RSPEAK(104)
- XC !DESCRIBE.
- X I=105
- XC !ASSUME OK.
- X IF(SAFEF) I=106
- XC !BLOWN?
- X CALL RSPEAK(I)
- XC !DESCRIBE.
- X RETURN
- XC
- XC R36-- MAGNET ROOM. DESCRIBE, CHECK FOR SPINDIZZY DOOM.
- XC
- X36000 IF(PRSA.NE.LOOKW) GO TO 36500
- XC !LOOK?
- X CALL RSPEAK(107)
- XC !DESCRIBE.
- X RETURN
- XC
- X36500 IF((PRSA.NE.WALKIW).OR. .NOT.CAROFF) RETURN
- XC !WALKIN ON FLIPPED?
- X IF(CAROZF) GO TO 36600
- XC !ZOOM?
- X CALL RSPEAK(108)
- XC !NO, SPIN HIS COMPASS.
- X RETURN
- XC
- X36600 I=58
- XC !SPIN HIS INSIDES.
- X IF(WINNER.NE.PLAYER) I=99
- XC !SPIN ROBOT.
- X CALL JIGSUP(I)
- XC !DEAD.
- X RETURN
- XC
- XC R37-- CAGE ROOM. IF SOLVED CAGE, MOVE TO OTHER CAGE ROOM.
- XC
- X37000 IF(CAGESF) F=MOVETO(CAGER,WINNER)
- XC !IF SOLVED, MOVE.
- X RETURN
- XC
- X END
- END_OF_rooms.F
- if test 13238 -ne `wc -c <rooms.F`; then
- echo shar: \"rooms.F\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f sobjs.F -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"sobjs.F\"
- else
- echo shar: Extracting \"sobjs.F\" \(13294 characters\)
- sed "s/^X//" >sobjs.F <<'END_OF_sobjs.F'
- XC SOBJS- SIMPLE OBJECTS PROCESSOR
- XC OBJECTS IN THIS MODULE CANNOT CALL RMINFO, JIGSUP,
- XC MAJOR VERBS, OR OTHER NON-RESIDENT SUBROUTINES
- XC
- XC COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
- XC ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
- XC WRITTEN BY R. M. SUPNIK
- XC
- XC DECLARATIONS
- XC
- X LOGICAL FUNCTION SOBJS(RI,ARG)
- X IMPLICIT INTEGER (A-Z)
- X LOGICAL QOPEN
- X LOGICAL MOVETO,OPNCLS,LIT
- X LOGICAL QHERE,F
- X#include "parser.h"
- X#include "gamestate.h"
- X#include "state.h"
- X#include "rooms.h"
- X#include "rflag.h"
- X#include "rindex.h"
- X#include "objects.h"
- X#include "oflags.h"
- X#include "oindex.h"
- X#include "clock.h"
- X
- X#include "villians.h"
- X#include "advers.h"
- X#include "verbs.h"
- X#include "flags.h"
- XC
- XC FUNCTIONS AND DATA
- XC
- X QOPEN(R)=and(OFLAG2(R),OPENBT).NE.0
- XC SOBJS, PAGE 2
- XC
- X IF(PRSO.GT.220) GO TO 5
- X IF(PRSO.NE.0) ODO2=ODESC2(PRSO)
- X5 IF(PRSI.NE.0) ODI2=ODESC2(PRSI)
- X AV=AVEHIC(WINNER)
- X SOBJS=.TRUE.
- XC
- X GO TO (1000,3000,4000,6000,7000,8000,9000,
- X& 13000,14000,16000,17000,
- X& 21000,23000,24000,27000,28000,29000,30000,
- X& 31000,33000,34000,36000,37000,38000,
- X& 41000,42000,43000,44000,46000,
- X& 53000,56000)
- X& RI
- X CALL BUG(6,RI)
- XC
- XC RETURN HERE TO DECLARE FALSE RESULT
- XC
- X10 SOBJS=.FALSE.
- X RETURN
- XC SOBJS, PAGE 3
- XC
- XC O1-- GUNK FUNCTION
- XC
- X1000 IF(OCAN(GUNK).EQ.0) GO TO 10
- XC !NOT INSIDE? F
- X CALL NEWSTA(GUNK,122,0,0,0)
- XC !FALLS APART.
- X RETURN
- XC
- XC O2-- TROPHY CASE
- XC
- X3000 IF(PRSA.NE.TAKEW) GO TO 10
- XC !TAKE?
- X CALL RSPEAK(128)
- XC !CANT.
- X RETURN
- XC
- XC O3-- BOTTLE FUNCTION
- XC
- X4000 IF(PRSA.NE.THROWW) GO TO 4100
- XC !THROW?
- X CALL NEWSTA(PRSO,129,0,0,0)
- XC !BREAKS.
- X RETURN
- XC
- X4100 IF(PRSA.NE.MUNGW) GO TO 10
- XC !MUNG?
- X CALL NEWSTA(PRSO,131,0,0,0)
- XC !BREAKS.
- X RETURN
- XC SOBJS, PAGE 4
- XC
- XC O4-- ROPE FUNCTION
- XC
- X6000 IF(HERE.EQ.DOME) GO TO 6100
- XC !IN DOME?
- X DOMEF=.FALSE.
- XC !NO,
- X IF(PRSA.NE.UNTIEW) GO TO 6050
- XC !UNTIE?
- X CALL RSPEAK(134)
- XC !CANT
- X RETURN
- XC
- X6050 IF(PRSA.NE.TIEW) GO TO 10
- XC !TIE?
- X CALL RSPEAK(135)
- XC !CANT TIE
- X RETURN
- XC
- X6100 IF((PRSA.NE.TIEW).OR.(PRSI.NE.RAILI)) GO TO 6200
- X IF(DOMEF) GO TO 6150
- XC !ALREADY TIED?
- X DOMEF=.TRUE.
- XC !NO, TIE IT.
- X OFLAG1(ROPE)=or(OFLAG1(ROPE),NDSCBT)
- X OFLAG2(ROPE)=or(OFLAG2(ROPE),CLMBBT)
- X CALL NEWSTA(ROPE,137,DOME,0,0)
- X RETURN
- XC
- X6150 CALL RSPEAK(136)
- XC !DUMMY.
- X RETURN
- XC
- X6200 IF(PRSA.NE.UNTIEW) GO TO 6300
- XC !UNTIE?
- X IF(DOMEF) GO TO 6250
- XC !TIED?
- X CALL RSPEAK(134)
- XC !NO, DUMMY.
- X RETURN
- XC
- X6250 DOMEF=.FALSE.
- XC !YES, UNTIE IT.
- X OFLAG1(ROPE)=and(OFLAG1(ROPE), not(NDSCBT))
- X OFLAG2(ROPE)=and(OFLAG2(ROPE), not(CLMBBT))
- X CALL RSPEAK(139)
- X RETURN
- XC
- X6300 IF(DOMEF.OR.(PRSA.NE.DROPW)) GO TO 6400
- XC !DROP & UNTIED?
- X CALL NEWSTA(ROPE,140,MTORC,0,0)
- XC !YES, DROP.
- X RETURN
- XC
- X6400 IF((PRSA.NE.TAKEW).OR. .NOT.DOMEF) GO TO 10
- X CALL RSPEAK(141)
- XC !TAKE & TIED.
- X RETURN
- XC
- XC O5-- SWORD FUNCTION
- XC
- X7000 IF((PRSA.EQ.TAKEW).AND.(WINNER.EQ.PLAYER))
- X& SWDACT=.TRUE.
- X GO TO 10
- XC
- XC O6-- LANTERN
- XC
- X8000 IF(PRSA.NE.THROWW) GO TO 8100
- XC !THROW?
- X CALL NEWSTA(LAMP,0,0,0,0)
- XC !KILL LAMP,
- X CALL NEWSTA(BLAMP,142,HERE,0,0)
- XC !REPLACE WITH BROKEN.
- X RETURN
- XC
- X8100 IF(PRSA.EQ.TRNONW) CFLAG(CEVLNT)=.TRUE.
- X IF(PRSA.EQ.TRNOFW) CFLAG(CEVLNT)=.FALSE.
- X GO TO 10
- XC
- XC O7-- RUG FUNCTION
- XC
- X9000 IF(PRSA.NE.RAISEW) GO TO 9100
- XC !RAISE?
- X CALL RSPEAK(143)
- XC !CANT
- X RETURN
- XC
- X9100 IF(PRSA.NE.TAKEW) GO TO 9200
- XC !TAKE?
- X CALL RSPEAK(144)
- XC !CANT
- X RETURN
- XC
- X9200 IF(PRSA.NE.MOVEW) GO TO 9300
- XC !MOVE?
- X CALL RSPEAK(145+ORRUG)
- X ORRUG=1
- X OFLAG1(DOOR)=or(OFLAG1(DOOR),VISIBT)
- X RETURN
- XC
- X9300 IF((PRSA.NE.LOOKUW).OR.(ORRUG.NE.0).OR.
- X& QOPEN(DOOR)) GO TO 10
- X CALL RSPEAK(345)
- X RETURN
- XC SOBJS, PAGE 5
- XC
- XC O8-- SKELETON
- XC
- X13000 I=ROBRM(HERE,100,LLD2,0,0)+ROBADV(WINNER,LLD2,0,0)
- X IF(I.NE.0) CALL RSPEAK(162)
- XC !IF ROBBED, SAY SO.
- X RETURN
- XC
- XC O9-- MIRROR
- XC
- X14000 IF(MIRRMF.OR.(PRSA.NE.RUBW)) GO TO 14500
- X MROOM=xor(HERE,1)
- X DO 14100 I=1,OLNT
- XC !INTERCHANGE OBJS.
- X IF(OROOM(I).EQ.HERE) OROOM(I)=-1
- X IF(OROOM(I).EQ.MROOM) OROOM(I)=HERE
- X IF(OROOM(I).EQ.-1) OROOM(I)=MROOM
- X14100 CONTINUE
- X F=MOVETO(MROOM,WINNER)
- X CALL RSPEAK(163)
- XC !SHAKE WORLD.
- X RETURN
- XC
- X14500 IF((PRSA.NE.LOOKW).AND.(PRSA.NE.LOOKIW).AND.
- X& (PRSA.NE.EXAMIW)) GO TO 14600
- X I=164
- XC !MIRROR OK.
- X IF(MIRRMF) I=165
- XC !MIRROR DEAD.
- X CALL RSPEAK(I)
- X RETURN
- XC
- X14600 IF(PRSA.NE.TAKEW) GO TO 14700
- XC !TAKE?
- X CALL RSPEAK(166)
- XC !JOKE.
- X RETURN
- XC
- X14700 IF((PRSA.NE.MUNGW).AND.(PRSA.NE.THROWW)) GO TO 10
- X I=167
- XC !MIRROR BREAKS.
- X IF(MIRRMF) I=168
- XC !MIRROR ALREADY BROKEN.
- X MIRRMF=.TRUE.
- X BADLKF=.TRUE.
- X CALL RSPEAK(I)
- X RETURN
- XC SOBJS, PAGE 6
- XC
- XC O10-- DUMBWAITER
- XC
- X16000 IF(PRSA.NE.RAISEW) GO TO 16100
- XC !RAISE?
- X IF(CAGETF) GO TO 16400
- XC !ALREADY AT TOP?
- X CALL NEWSTA(TBASK,175,TSHAF,0,0)
- XC !NO, RAISE BASKET.
- X CALL NEWSTA(FBASK,0,BSHAF,0,0)
- X CAGETF=.TRUE.
- XC !AT TOP.
- X RETURN
- XC
- X16100 IF(PRSA.NE.LOWERW) GO TO 16200
- XC !LOWER?
- X IF(.NOT.CAGETF) GO TO 16400
- XC !ALREADY AT BOTTOM?
- X CALL NEWSTA(TBASK,176,BSHAF,0,0)
- XC !NO, LOWER BASKET.
- X CALL NEWSTA(FBASK,0,TSHAF,0,0)
- X CAGETF=.FALSE.
- X IF(.NOT.LIT(HERE)) CALL RSPEAK(406)
- XC !IF DARK, DIE.
- X RETURN
- XC
- X16200 IF((PRSO.NE.FBASK).AND.(PRSI.NE.FBASK)) GO TO 16300
- X CALL RSPEAK(130)
- XC !WRONG BASKET.
- X RETURN
- XC
- X16300 IF(PRSA.NE.TAKEW) GO TO 10
- XC !TAKE?
- X CALL RSPEAK(177)
- XC !JOKE.
- X RETURN
- XC
- X16400 CALL RSPEAK(125+RND(3))
- XC !DUMMY.
- X RETURN
- XC
- XC O11-- GHOST FUNCTION
- XC
- X17000 I=178
- XC !ASSUME DIRECT.
- X IF(PRSO.NE.GHOST) I=179
- XC !IF NOT, INDIRECT.
- X CALL RSPEAK(I)
- X RETURN
- XC !SPEAK AND EXIT.
- XC SOBJS, PAGE 7
- XC
- XC O12-- TUBE
- XC
- X21000 IF((PRSA.NE.PUTW).OR.(PRSI.NE.TUBE)) GO TO 10
- X CALL RSPEAK(186)
- XC !CANT PUT BACK IN.
- X RETURN
- XC
- XC O13-- CHALICE
- XC
- X23000 IF((PRSA.NE.TAKEW).OR.(OCAN(PRSO).NE.0).OR.
- X& (OROOM(PRSO).NE.TREAS).OR.(OROOM(THIEF).NE.TREAS).OR.
- X& (and(OFLAG2(THIEF),FITEBT).EQ.0).OR.
- X& .NOT. THFACT) GO TO 10
- X CALL RSPEAK(204)
- XC !CANT TAKE.
- X RETURN
- XC
- XC O14-- PAINTING
- XC
- X24000 IF(PRSA.NE.MUNGW) GO TO 10
- XC !MUNG?
- X CALL RSPEAK(205)
- XC !DESTROY PAINTING.
- X OFVAL(PRSO)=0
- X OTVAL(PRSO)=0
- X ODESC1(PRSO)=207
- X ODESC2(PRSO)=206
- X RETURN
- XC SOBJS, PAGE 8
- XC
- XC O15-- BOLT
- XC
- X27000 IF(PRSA.NE.TURNW) GO TO 10
- XC !TURN BOLT?
- X IF(PRSI.NE.WRENC) GO TO 27500
- XC !WITH WRENCH?
- X IF(GATEF) GO TO 27100
- XC !PROPER BUTTON PUSHED?
- X CALL RSPEAK(210)
- XC !NO, LOSE.
- X RETURN
- XC
- X27100 IF(LWTIDF) GO TO 27200
- XC !LOW TIDE NOW?
- X LWTIDF=.TRUE.
- XC !NO, EMPTY DAM.
- X CALL RSPEAK(211)
- X OFLAG2(COFFI)=and(OFLAG2(COFFI), not(SCRDBT))
- X OFLAG1(TRUNK)=or(OFLAG1(TRUNK),VISIBT)
- X RFLAG(RESER)=and(or(RFLAG(RESER),RLAND)
- X& ,not(RWATER+RSEEN))
- X RETURN
- XC
- X27200 LWTIDF=.FALSE.
- XC !YES, FILL DAM.
- X CALL RSPEAK(212)
- X IF(QHERE(TRUNK,RESER))
- X& OFLAG1(TRUNK)=and(OFLAG1(TRUNK), not(VISIBT))
- X RFLAG(RESER)=and(or(RFLAG(RESER),RWATER) ,not(RLAND))
- X RETURN
- XC
- X27500 CALL RSPSUB(299,ODI2)
- XC !NOT WITH THAT.
- X RETURN
- XC
- XC O16-- GRATING
- XC
- X28000 IF((PRSA.NE.OPENW).AND.(PRSA.NE.CLOSEW)) GO TO 10
- X IF(GRUNLF) GO TO 28200
- XC !UNLOCKED?
- X CALL RSPEAK(214)
- XC !NO, LOCKED.
- X RETURN
- XC
- X28200 I=215
- XC !UNLOCKED, VIEW FRM CLR.
- X IF(HERE.NE.CLEAR) I=216
- XC !VIEW FROM BELOW.
- X SOBJS=OPNCLS(GRATE,I,885)
- XC !OPEN/CLOSE.
- X RFLAG(MGRAT)=and(RFLAG(MGRAT), not(RLIGHT))
- X IF(QOPEN(GRATE)) RFLAG(MGRAT)=or(RFLAG(MGRAT),RLIGHT)
- X IF(.NOT.LIT(HERE)) CALL RSPEAK(406)
- XC !IF DARK, DIE.
- X RETURN
- XC
- XC O17-- TRAP DOOR
- XC
- X29000 IF(HERE.NE.LROOM) GO TO 29100
- XC !FROM LIVING ROOM?
- X SOBJS=OPNCLS(DOOR,218,219)
- XC !OPEN/CLOSE.
- X RETURN
- XC
- X29100 IF(HERE.NE.CELLA) GO TO 10
- XC !FROM CELLAR?
- X IF((PRSA.NE.OPENW).OR.QOPEN(DOOR)) GO TO 29200
- X CALL RSPEAK(220)
- XC !CANT OPEN CLOSED DOOR.
- X RETURN
- XC
- X29200 SOBJS=OPNCLS(DOOR,0,22)
- XC !NORMAL OPEN/CLOSE.
- X RETURN
- XC
- XC O18-- DURABLE DOOR
- XC
- X30000 I=0
- XC !ASSUME NO APPL.
- X IF(PRSA.EQ.OPENW) I=221
- XC !OPEN?
- X IF(PRSA.EQ.BURNW) I=222
- XC !BURN?
- X IF(PRSA.EQ.MUNGW) I=223+RND(3)
- XC !MUNG?
- X IF(I.EQ.0) GO TO 10
- X CALL RSPEAK(I)
- X RETURN
- XC
- XC O19-- MASTER SWITCH
- XC
- X31000 IF(PRSA.NE.TURNW) GO TO 10
- XC !TURN?
- X IF(PRSI.NE.SCREW) GO TO 31500
- XC !WITH SCREWDRIVER?
- X IF(QOPEN(MACHI)) GO TO 31600
- XC !LID UP?
- X CALL RSPEAK(226)
- XC !NO, ACTIVATE.
- X IF(OCAN(COAL).NE.MACHI) GO TO 31400
- XC !COAL INSIDE?
- X CALL NEWSTA(COAL,0,0,0,0)
- XC !KILL COAL,
- X CALL NEWSTA(DIAMO,0,0,MACHI,0)
- XC !REPLACE WITH DIAMOND.
- X RETURN
- XC
- X31400 DO 31450 I=1,OLNT
- XC !KILL NONCOAL OBJECTS.
- X IF(OCAN(I).NE.MACHI) GO TO 31450
- XC !INSIDE MACHINE?
- X CALL NEWSTA(I,0,0,0,0)
- XC !KILL OBJECT AND CONTENTS.
- X CALL NEWSTA(GUNK,0,0,MACHI,0)
- XC !REDUCE TO GUNK.
- X31450 CONTINUE
- X RETURN
- XC
- X31500 CALL RSPSUB(300,ODI2)
- XC !CANT TURN WITH THAT.
- X RETURN
- XC
- X31600 CALL RSPEAK(227)
- XC !LID IS UP.
- X RETURN
- XC SOBJS, PAGE 9
- XC
- XC O20-- LEAK
- XC
- X33000 IF((PRSO.NE.LEAK).OR.(PRSA.NE.PLUGW).OR.(RVMNT.LE.0))
- X& GO TO 10
- X IF(PRSI.NE.PUTTY) GO TO 33100
- XC !WITH PUTTY?
- X RVMNT=-1
- XC !DISABLE LEAK.
- X CTICK(CEVMNT)=0
- X CALL RSPEAK(577)
- X RETURN
- XC
- X33100 CALL RSPSUB(301,ODI2)
- XC !CANT WITH THAT.
- X RETURN
- XC
- XC O21-- DROWNING BUTTONS
- XC
- X34000 IF(PRSA.NE.PUSHW) GO TO 10
- XC !PUSH?
- X GO TO (34100,34200,34300,34400),(PRSO-RBUTT+1)
- X GO TO 10
- XC !NOT A BUTTON.
- XC
- X34100 RFLAG(HERE)=xor(RFLAG(HERE),RLIGHT)
- X I=230
- X IF(and(RFLAG(HERE),RLIGHT).NE.0) I=231
- X CALL RSPEAK(I)
- X RETURN
- XC
- X34200 GATEF=.TRUE.
- XC !RELEASE GATE.
- X CALL RSPEAK(232)
- X RETURN
- XC
- X34300 GATEF=.FALSE.
- XC !INTERLOCK GATE.
- X CALL RSPEAK(232)
- X RETURN
- XC
- X34400 IF(RVMNT.NE.0) GO TO 34500
- XC !LEAK ALREADY STARTED?
- X CALL RSPEAK(233)
- XC !NO, START LEAK.
- X RVMNT=1
- X CTICK(CEVMNT)=-1
- X RETURN
- XC
- X34500 CALL RSPEAK(234)
- XC !BUTTON JAMMED.
- X RETURN
- XC
- XC O22-- INFLATABLE BOAT
- XC
- X36000 IF(PRSA.NE.INFLAW) GO TO 10
- XC !INFLATE?
- X IF(OROOM(IBOAT).NE.0) GO TO 36100
- XC !IN ROOM?
- X CALL RSPEAK(235)
- XC !NO, JOKE.
- X RETURN
- XC
- X36100 IF(PRSI.NE.PUMP) GO TO 36200
- XC !WITH PUMP?
- X CALL NEWSTA(IBOAT,0,0,0,0)
- XC !KILL DEFL BOAT,
- X CALL NEWSTA(RBOAT,236,HERE,0,0)
- XC !REPL WITH INF.
- X DEFLAF=.FALSE.
- X RETURN
- XC
- X36200 I=237
- XC !JOKES.
- X IF(PRSI.NE.LUNGS) I=303
- X CALL RSPSUB(I,ODI2)
- X RETURN
- XC
- XC O23-- DEFLATED BOAT
- XC
- X37000 IF(PRSA.NE.INFLAW) GO TO 37100
- XC !INFLATE?
- X CALL RSPEAK(238)
- XC !JOKE.
- X RETURN
- XC
- X37100 IF(PRSA.NE.PLUGW) GO TO 10
- XC !PLUG?
- X IF(PRSI.NE.PUTTY) GO TO 33100
- XC !WITH PUTTY?
- X CALL NEWSTA(IBOAT,239,OROOM(DBOAT),OCAN(DBOAT),OADV(DBOAT))
- X CALL NEWSTA(DBOAT,0,0,0,0)
- XC !KILL DEFL BOAT, REPL.
- X RETURN
- XC SOBJS, PAGE 10
- XC
- XC O24-- RUBBER BOAT
- XC
- X38000 IF(ARG.NE.0) GO TO 10
- XC !DISMISS READIN, OUT.
- X IF((PRSA.NE.BOARDW).OR.(OADV(STICK).NE.WINNER)) GO TO 38100
- X CALL NEWSTA(RBOAT,0,0,0,0)
- XC !KILL INFL BOAT,
- X CALL NEWSTA(DBOAT,240,HERE,0,0)
- XC !REPL WITH DEAD.
- X DEFLAF=.TRUE.
- X RETURN
- XC
- X38100 IF(PRSA.NE.INFLAW) GO TO 38200
- XC !INFLATE?
- X CALL RSPEAK(367)
- XC !YES, JOKE.
- X RETURN
- XC
- X38200 IF(PRSA.NE.DEFLAW) GO TO 10
- XC !DEFLATE?
- X IF(AV.EQ.RBOAT) GO TO 38300
- XC !IN BOAT?
- X IF(OROOM(RBOAT).EQ.0) GO TO 38400
- XC !ON GROUND?
- X CALL NEWSTA(RBOAT,0,0,0,0)
- XC !KILL INFL BOAT,
- X CALL NEWSTA(IBOAT,241,HERE,0,0)
- XC !REPL WITH DEFL.
- X DEFLAF=.TRUE.
- X RETURN
- XC
- X38300 CALL RSPEAK(242)
- XC !IN BOAT.
- X RETURN
- XC
- X38400 CALL RSPEAK(243)
- XC !NOT ON GROUND.
- X RETURN
- XC
- XC O25-- BRAIDED ROPE
- XC
- X41000 IF((PRSA.NE.TIEW).OR.(PRSO.NE.BROPE).OR.
- X& ((PRSI.NE.HOOK1).AND.(PRSI.NE.HOOK2)))
- X& GO TO 41500
- X BTIEF=PRSI
- XC !RECORD LOCATION.
- X CFLAG(CEVBAL)=.FALSE.
- XC !STALL ASCENT.
- X CALL RSPEAK(248)
- X RETURN
- XC
- X41500 IF((PRSA.NE.UNTIEW).OR.(PRSO.NE.BROPE)) GO TO 10
- X IF(BTIEF.NE.0) GO TO 41600
- XC !TIED UP?
- X CALL RSPEAK(249)
- XC !NO, JOKE.
- X RETURN
- XC
- X41600 CALL RSPEAK(250)
- X BTIEF=0
- XC !UNTIE.
- X CTICK(CEVBAL)=3
- XC !RESTART CLOCK.
- X CFLAG(CEVBAL)=.TRUE.
- X RETURN
- XC
- XC O26-- SAFE
- XC
- X42000 I=0
- XC !ASSUME UNPROCESSED.
- X IF(PRSA.EQ.TAKEW) I=251
- XC !TAKE?
- X IF((PRSA.EQ.OPENW).AND.SAFEF) I=253
- XC !OPEN AFTER BLAST?
- X IF((PRSA.EQ.OPENW).AND..NOT.SAFEF) I=254
- XC !OPEN BEFORE BLAST?
- X IF((PRSA.EQ.CLOSEW).AND.SAFEF) I=253
- XC !CLOSE AFTER?
- X IF((PRSA.EQ.CLOSEW).AND..NOT.SAFEF) I=255
- X IF(I.EQ.0) GO TO 10
- X CALL RSPEAK(I)
- X RETURN
- XC
- XC O27-- FUSE
- XC
- X43000 IF(PRSA.NE.BURNW) GO TO 10
- XC !BURN?
- X CALL RSPEAK(256)
- X CTICK(CEVFUS)=2
- XC !START COUNTDOWN.
- X RETURN
- XC
- XC O28-- GNOME
- XC
- X44000 IF((PRSA.NE.GIVEW).AND.(PRSA.NE.THROWW)) GO TO 44500
- X IF(OTVAL(PRSO).EQ.0) GO TO 44100
- XC !TREASURE?
- X CALL RSPSUB(257,ODO2)
- XC !YES, GET DOOR.
- X CALL NEWSTA(PRSO,0,0,0,0)
- X CALL NEWSTA(GNOME,0,0,0,0)
- XC !VANISH GNOME.
- X GNODRF=.TRUE.
- X RETURN
- XC
- X44100 CALL RSPSUB(258,ODO2)
- XC !NO, LOSE OBJECT.
- X CALL NEWSTA(PRSO,0,0,0,0)
- X RETURN
- XC
- X44500 CALL RSPEAK(259)
- XC !NERVOUS GNOME.
- X IF(.NOT.GNOMEF) CTICK(CEVGNO)=5
- XC !SCHEDULE BYEBYE.
- X GNOMEF=.TRUE.
- X RETURN
- XC
- XC O29-- COKE BOTTLES
- XC
- X46000 IF((PRSA.NE.THROWW).AND.(PRSA.NE.MUNGW)) GO TO 10
- X CALL NEWSTA(PRSO,262,0,0,0)
- XC !MUNG BOTTLES.
- X RETURN
- XC SOBJS, PAGE 11
- XC
- XC
- XC O30-- ROBOT
- XC
- X53000 IF(PRSA.NE.GIVEW) GO TO 53200
- XC !GIVE?
- X CALL NEWSTA(PRSO,0,0,0,AROBOT)
- XC !PUT ON ROBOT.
- X CALL RSPSUB(302,ODO2)
- X RETURN
- XC
- X53200 IF((PRSA.NE.MUNGW).AND.(PRSA.NE.THROWW)) GO TO 10
- X CALL NEWSTA(ROBOT,285,0,0,0)
- XC !KILL ROBOT.
- X RETURN
- XC
- XC O31-- GRUE
- XC
- X56000 IF(PRSA.NE.EXAMIW) GO TO 56100
- XC !EXAMINE?
- X CALL RSPEAK(288)
- X RETURN
- XC
- X56100 IF(PRSA.NE.FINDW) GO TO 10
- XC !FIND?
- X CALL RSPEAK(289)
- X RETURN
- XC
- X END
- END_OF_sobjs.F
- if test 13294 -ne `wc -c <sobjs.F`; then
- echo shar: \"sobjs.F\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f verbs.h -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"verbs.h\"
- else
- echo shar: Extracting \"verbs.h\" \(679 characters\)
- sed "s/^X//" >verbs.h <<'END_OF_verbs.h'
- XC
- XC VERBS
- XC
- X COMMON /VINDEX/ CINTW,DEADXW,FRSTQW,INXW,OUTXW
- X COMMON /VINDEX/ WALKIW,FIGHTW,FOOW
- X COMMON /VINDEX/ MELTW,READW,INFLAW,DEFLAW,ALARMW,EXORCW
- X COMMON /VINDEX/ PLUGW,KICKW,WAVEW,RAISEW,LOWERW,RUBW
- X COMMON /VINDEX/ PUSHW,UNTIEW,TIEW,TIEUPW,TURNW,BREATW
- X COMMON /VINDEX/ KNOCKW,LOOKW,EXAMIW,SHAKEW,MOVEW,TRNONW,TRNOFW
- X COMMON /VINDEX/ OPENW,CLOSEW,FINDW,WAITW,SPINW,BOARDW,UNBOAW,TAKEW
- X COMMON /VINDEX/ INVENW,FILLW,EATW,DRINKW,BURNW
- X COMMON /VINDEX/ MUNGW,KILLW,ATTACW,SWINGW
- X COMMON /VINDEX/ WALKW,TELLW,PUTW,DROPW,GIVEW,POURW,THROWW
- X COMMON /VINDEX/ DIGW,LEAPW,STAYW,FOLLOW
- X COMMON /VINDEX/ HELLOW,LOOKIW,LOOKUW,PUMPW,WINDW
- X COMMON /VINDEX/ CLMBW,CLMBUW,CLMBDW,TRNTOW
- END_OF_verbs.h
- if test 679 -ne `wc -c <verbs.h`; then
- echo shar: \"verbs.h\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f villns.F -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"villns.F\"
- else
- echo shar: Extracting \"villns.F\" \(7657 characters\)
- sed "s/^X//" >villns.F <<'END_OF_villns.F'
- XC TROLLP- TROLL FUNCTION
- XC
- XC COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142
- XC ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED
- XC WRITTEN BY R. M. SUPNIK
- XC
- XC DECLARATIONS
- XC
- X LOGICAL FUNCTION TROLLP(ARG)
- X IMPLICIT INTEGER (A-Z)
- X LOGICAL QHERE,PROB
- X#include "parser.h"
- X#include "gamestate.h"
- X#include "objects.h"
- X#include "oflags.h"
- X#include "oindex.h"
- X#include "verbs.h"
- X#include "flags.h"
- XC TROLLP, PAGE 2
- XC
- X TROLLP=.TRUE.
- XC !ASSUME WINS.
- X IF(PRSA.NE.FIGHTW) GO TO 1100
- XC !FIGHT?
- X IF(OCAN(AXE).EQ.TROLL) GO TO 10
- XC !GOT AXE? NOTHING.
- X I=433
- XC !ASSUME CANT GET.
- X IF(.NOT.QHERE(AXE,HERE)) GO TO 1050
- XC !HERE?
- X I=434
- XC !YES, RECOVER.
- X CALL NEWSTA(AXE,0,0,TROLL,0)
- X1050 IF(QHERE(TROLL,HERE)) CALL RSPEAK(I)
- XC !IF PLAYER HERE.
- X RETURN
- XC
- X1100 IF(PRSA.NE.DEADXW) GO TO 1200
- XC !DEAD?
- X TROLLF=.TRUE.
- XC !PERMIT EXITS.
- X RETURN
- XC
- X1200 IF(PRSA.NE.OUTXW) GO TO 1300
- XC !OUT?
- X TROLLF=.TRUE.
- XC !PERMIT EXITS.
- X OFLAG1(AXE)=and(OFLAG1(AXE), not(VISIBT))
- X ODESC1(TROLL)=435
- XC !TROLL OUT.
- X RETURN
- XC
- X1300 IF(PRSA.NE.INXW) GO TO 1400
- XC !WAKE UP?
- X TROLLF=.FALSE.
- XC !FORBID EXITS.
- X OFLAG1(AXE)=or(OFLAG1(AXE),VISIBT)
- X ODESC1(TROLL)=436
- XC !TROLL IN.
- X IF(QHERE(TROLL,HERE)) CALL RSPEAK(437)
- X RETURN
- XC
- X1400 IF(PRSA.NE.FRSTQW) GO TO 1500
- XC !FIRST ENCOUNTER?
- X TROLLP=PROB(33,66)
- XC !33% TRUE UNLESS BADLK.
- X RETURN
- XC
- X1500 IF((PRSA.NE.MOVEW).AND.(PRSA.NE.TAKEW).AND.(PRSA.NE.MUNGW)
- X& .AND.(PRSA.NE.THROWW).AND.(PRSA.NE.GIVEW)) GO TO 2000
- X IF(OCAPAC(TROLL).GE.0) GO TO 1550
- XC !TROLL OUT?
- X OCAPAC(TROLL)=-OCAPAC(TROLL)
- XC !YES, WAKE HIM.
- X OFLAG1(AXE)=or(OFLAG1(AXE),VISIBT)
- X TROLLF=.FALSE.
- X ODESC1(TROLL)=436
- X CALL RSPEAK(437)
- XC
- X1550 IF((PRSA.NE.TAKEW).AND.(PRSA.NE.MOVEW)) GO TO 1600
- X CALL RSPEAK(438)
- XC !JOKE.
- X RETURN
- XC
- X1600 IF(PRSA.NE.MUNGW) GO TO 1700
- XC !MUNG?
- X CALL RSPEAK(439)
- XC !JOKE.
- X RETURN
- XC
- X1700 IF(PRSO.EQ.0) GO TO 10
- XC !NO OBJECT?
- X I=440
- XC !ASSUME THROW.
- X IF(PRSA.EQ.GIVEW) I=441
- XC !GIVE?
- X CALL RSPSUB(I,ODESC2(PRSO))
- XC !TROLL TAKES.
- X IF(PRSO.EQ.KNIFE) GO TO 1900
- XC !OBJ KNIFE?
- X CALL NEWSTA(PRSO,442,0,0,0)
- XC !NO, EATS IT.
- X RETURN
- XC
- X1900 CALL RSPEAK(443)
- XC !KNIFE, THROWS IT BACK
- X OFLAG2(TROLL)=or(OFLAG2(TROLL),FITEBT)
- X RETURN
- XC
- X2000 IF(.NOT.TROLLF.OR.(PRSA.NE.HELLOW)) GO TO 10
- X CALL RSPEAK(366)
- XC !TROLL OUT.
- X RETURN
- XC
- X10 TROLLP=.FALSE.
- XC !COULDNT HANDLE IT.
- X RETURN
- X END
- XC CYCLOP- CYCLOPS FUNCTION
- XC
- XC DECLARATIONS
- XC
- X LOGICAL FUNCTION CYCLOP(ARG)
- X IMPLICIT INTEGER (A-Z)
- X#include "parser.h"
- X#include "gamestate.h"
- X#include "objects.h"
- X#include "oflags.h"
- X#include "oindex.h"
- X#include "verbs.h"
- X#include "flags.h"
- XC CYCLOP, PAGE 2
- XC
- X CYCLOP=.TRUE.
- XC !ASSUME WINS.
- X IF(.NOT.CYCLOF) GO TO 100
- XC !ASLEEP?
- X IF((PRSA.NE.ALARMW).AND.(PRSA.NE.MUNGW).AND.(PRSA.NE.HELLOW).AND.
- X& (PRSA.NE.BURNW).AND.(PRSA.NE.KILLW).AND.(PRSA.NE.ATTACW))
- X& GO TO 10
- X CYCLOF=.FALSE.
- XC !WAKE CYCLOPS.
- X CALL RSPEAK(187)
- XC !DESCRIBE.
- X RVCYC=IABS(RVCYC)
- X OFLAG2(CYCLO)=and(or(OFLAG2(CYCLO),FITEBT),not(SLEPBT))
- X RETURN
- XC
- X100 IF((PRSA.EQ.FIGHTW).OR.(PRSA.EQ.FRSTQW)) GO TO 10
- X IF(IABS(RVCYC).LE.5) GO TO 200
- XC !ANNOYED TOO MUCH?
- X RVCYC=0
- XC !RESTART COUNT.
- X CALL JIGSUP(188)
- XC !YES, EATS PLAYER.
- X RETURN
- XC
- X200 IF(PRSA.NE.GIVEW) GO TO 500
- XC !GIVE?
- X IF((PRSO.NE.FOOD).OR.(RVCYC.LT.0)) GO TO 300
- XC !FOOD WHEN HUNGRY?
- X CALL NEWSTA(FOOD,189,0,0,0)
- XC !EATS PEPPERS.
- X RVCYC=MIN0(-1,-RVCYC)
- XC !GETS THIRSTY.
- X RETURN
- XC
- X300 IF(PRSO.NE.WATER) GO TO 400
- XC !DRINK WHEN THIRSTY?
- X IF(RVCYC.GE.0) GO TO 350
- X CALL NEWSTA(PRSO,190,0,0,0)
- XC !DRINKS AND
- X CYCLOF=.TRUE.
- XC !FALLS ASLEEP.
- X OFLAG2(CYCLO)=and(or(OFLAG2(CYCLO),SLEPBT),not(FITEBT))
- X RETURN
- XC
- X350 CALL RSPEAK(191)
- XC !NOT THIRSTY.
- X10 CYCLOP=.FALSE.
- XC !FAILS.
- X RETURN
- XC
- X400 I=192
- XC !ASSUME INEDIBLE.
- X IF(PRSO.EQ.GARLI) I=193
- XC !GARLIC IS JOKE.
- X450 CALL RSPEAK(I)
- XC !DISDAIN IT.
- X IF(RVCYC.LT.0) RVCYC=RVCYC-1
- X IF(RVCYC.GE.0) RVCYC=RVCYC+1
- X IF(.NOT.CYCLOF) CALL RSPEAK(193+IABS(RVCYC))
- X RETURN
- XC
- X500 I=0
- XC !ASSUME NOT HANDLED.
- X IF(PRSA.EQ.HELLOW) GO TO 450
- XC !HELLO IS NO GO.
- X IF((PRSA.EQ.THROWW).OR.(PRSA.EQ.MUNGW)) I=200+RND(2)
- X IF(PRSA.EQ.TAKEW) I=202
- X IF(PRSA.EQ.TIEW) I=203
- X IF(I) 10,10,450
- XC !SEE IF HANDLED.
- XC
- X END
- XC THIEFP- THIEF FUNCTION
- XC
- XC DECLARATIONS
- XC
- X LOGICAL FUNCTION THIEFP(ARG)
- X IMPLICIT INTEGER (A-Z)
- X LOGICAL QHERE,PROB
- X#include "parser.h"
- X#include "gamestate.h"
- XC
- XC ROOMS
- X#include "rindex.h"
- X#include "objects.h"
- X#include "oflags.h"
- X#include "oindex.h"
- X#include "clock.h"
- X
- X#include "villians.h"
- X#include "verbs.h"
- X#include "flags.h"
- XC THIEFP, PAGE 2
- XC
- X THIEFP=.TRUE.
- XC !ASSUME WINS.
- X IF(PRSA.NE.FIGHTW) GO TO 100
- XC !FIGHT?
- X IF(OCAN(STILL).EQ.THIEF) GO TO 10
- XC !GOT STILLETTO? F.
- X IF(QHERE(STILL,THFPOS)) GO TO 50
- XC !CAN HE RECOVER IT?
- X CALL NEWSTA(THIEF,0,0,0,0)
- XC !NO, VANISH.
- X IF(QHERE(THIEF,HERE)) CALL RSPEAK(498)
- XC !IF HERO, TELL.
- X RETURN
- XC
- X50 CALL NEWSTA(STILL,0,0,THIEF,0)
- XC !YES, RECOVER.
- X IF(QHERE(THIEF,HERE)) CALL RSPEAK(499)
- XC !IF HERO, TELL.
- X RETURN
- XC
- X100 IF(PRSA.NE.DEADXW) GO TO 200
- XC !DEAD?
- X THFACT=.FALSE.
- XC !DISABLE DEMON.
- X OFLAG1(CHALI)=or(OFLAG1(CHALI),TAKEBT)
- X J=0
- X DO 125 I=1,OLNT
- XC !CARRYING ANYTHING?
- X125 IF(OADV(I).EQ.-THIEF) J=500
- X CALL RSPEAK(J)
- XC !TELL IF BOOTY REAPPEARS.
- XC
- X J=501
- X DO 150 I=1,OLNT
- XC !LOOP.
- X IF((I.EQ.CHALI).OR.(I.EQ.THIEF).OR.(HERE.NE.TREAS)
- X& .OR. .NOT.QHERE(I,HERE)) GO TO 135
- X OFLAG1(I)=or(OFLAG1(I),VISIBT)
- X CALL RSPSUB(J,ODESC2(I))
- XC !DESCRIBE.
- X J=502
- X GO TO 150
- XC
- X135 IF(OADV(I).EQ.-THIEF) CALL NEWSTA(I,0,HERE,0,0)
- X150 CONTINUE
- X RETURN
- XC
- X200 IF(PRSA.NE.FRSTQW) GO TO 250
- XC !FIRST ENCOUNTER?
- X THIEFP=PROB(20,75)
- X RETURN
- XC
- X250 IF((PRSA.NE.HELLOW).OR.(ODESC1(THIEF).NE.504))
- X& GO TO 300
- X CALL RSPEAK(626)
- X RETURN
- XC
- X300 IF(PRSA.NE.OUTXW) GO TO 400
- XC !OUT?
- X THFACT=.FALSE.
- XC !DISABLE DEMON.
- X ODESC1(THIEF)=504
- XC !CHANGE DESCRIPTION.
- X OFLAG1(STILL)=and(OFLAG1(STILL),not(VISIBT))
- X OFLAG1(CHALI)=or(OFLAG1(CHALI),TAKEBT)
- X RETURN
- XC
- X400 IF(PRSA.NE.INXW) GO TO 500
- XC !IN?
- X IF(QHERE(THIEF,HERE)) CALL RSPEAK(505)
- XC !CAN HERO SEE?
- X THFACT=.TRUE.
- XC !ENABLE DEMON.
- X ODESC1(THIEF)=503
- XC !CHANGE DESCRIPTION.
- X OFLAG1(STILL)=or(OFLAG1(STILL),VISIBT)
- X IF((HERE.EQ.TREAS).AND.QHERE(CHALI,HERE))
- X& OFLAG1(CHALI)=and(OFLAG1(CHALI),not(TAKEBT))
- X RETURN
- XC
- X500 IF(PRSA.NE.TAKEW) GO TO 600
- XC !TAKE?
- X CALL RSPEAK(506)
- XC !JOKE.
- X RETURN
- XC
- X600 IF((PRSA.NE.THROWW).OR.(PRSO.NE.KNIFE).OR.
- X& (and(OFLAG2(THIEF),FITEBT).NE.0)) GO TO 700
- X IF(PROB(10)) GO TO 650
- XC !THREW KNIFE, 10%?
- X CALL RSPEAK(507)
- XC !NO, JUST MAKES
- X OFLAG2(THIEF)=or(OFLAG2(THIEF),FITEBT)
- X RETURN
- XC
- X650 J=508
- XC !THIEF DROPS STUFF.
- X DO 675 I=1,OLNT
- X IF(OADV(I).NE.-THIEF) GO TO 675
- XC !THIEF CARRYING?
- X J=509
- X CALL NEWSTA(I,0,HERE,0,0)
- X675 CONTINUE
- X CALL NEWSTA(THIEF,J,0,0,0)
- XC !THIEF VANISHES.
- X RETURN
- XC
- X700 IF(((PRSA.NE.THROWW).AND.(PRSA.NE.GIVEW)).OR.(PRSO.EQ.0).OR.
- X& (PRSO.EQ.THIEF)) GO TO 10
- X IF(OCAPAC(THIEF).GE.0) GO TO 750
- XC !WAKE HIM UP.
- X OCAPAC(THIEF)=-OCAPAC(THIEF)
- X THFACT=.TRUE.
- X OFLAG1(STILL)=or(OFLAG1(STILL),VISIBT)
- X ODESC1(THIEF)=503
- X CALL RSPEAK(510)
- XC
- X750 IF((PRSO.NE.BRICK).OR.(OCAN(FUSE).NE.BRICK).OR.
- X& (CTICK(CEVFUS).EQ.0)) GO TO 800
- X CALL RSPEAK(511)
- XC !THIEF REFUSES BOMB.
- X RETURN
- XC
- X800 CALL NEWSTA(PRSO,0,0,0,-THIEF)
- XC !THIEF TAKES GIFT.
- X IF(OTVAL(PRSO).GT.0) GO TO 900
- XC !A TREASURE?
- X CALL RSPSUB(512,ODESC2(PRSO))
- X RETURN
- XC
- X900 CALL RSPSUB(627,ODESC2(PRSO))
- XC !THIEF ENGROSSED.
- X THFENF=.TRUE.
- X RETURN
- XC
- X10 THIEFP=.FALSE.
- X RETURN
- X END
- END_OF_villns.F
- if test 7657 -ne `wc -c <villns.F`; then
- echo shar: \"villns.F\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- echo shar: End of archive 3 \(of 7\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-